package com.linpq.road.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.linpq.road.mapper.RoadInformationMapper;
import com.linpq.road.domain.RoadInformation;
import com.linpq.road.service.IRoadInformationService;
import com.linpq.common.core.text.Convert;

/**
 * 道路基本信息Service业务层处理
 *
 * @author linpq
 * @date 2020-11-19
 */
@Service
public class RoadInformationServiceImpl implements IRoadInformationService {
    @Autowired
    private RoadInformationMapper roadInformationMapper;

    /**
     * 查询道路基本信息
     *
     * @param id 道路基本信息ID
     * @return 道路基本信息
     */
    @Override
    public RoadInformation selectRoadInformationById(Long id) {
        return roadInformationMapper.selectRoadInformationById(id);
    }

    /**
     * 查询道路基本信息列表
     *
     * @param roadInformation 道路基本信息
     * @return 道路基本信息
     */
    @Override
    public List<RoadInformation> selectRoadInformationList(RoadInformation roadInformation) {
        return roadInformationMapper.selectRoadInformationList(roadInformation);
    }

    /**
     * 新增道路基本信息
     *
     * @param roadInformation 道路基本信息
     * @return 结果
     */
    @Override
    public int insertRoadInformation(RoadInformation roadInformation) {
        return roadInformationMapper.insertRoadInformation(roadInformation);
    }

    /**
     * 修改道路基本信息
     *
     * @param roadInformation 道路基本信息
     * @return 结果
     */
    @Override
    public int updateRoadInformation(RoadInformation roadInformation) {
        return roadInformationMapper.updateRoadInformation(roadInformation);
    }

    /**
     * 删除道路基本信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRoadInformationByIds(String ids) {
        return roadInformationMapper.deleteRoadInformationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除道路基本信息信息
     *
     * @param id 道路基本信息ID
     * @return 结果
     */
    @Override
    public int deleteRoadInformationById(Long id) {
        return roadInformationMapper.deleteRoadInformationById(id);
    }

    @Override
    public List<RoadInformation> selectRoadInformationChroadName() {
        return roadInformationMapper.selectRoadInformationChroadName();
    }

    @Override
    public List<RoadInformation> selectRoadInformationRoadNameByChroad(String chroad) {
        return roadInformationMapper.selectRoadInformationRoadNameByChroad(chroad);
    }
}
